package com.black.system.domain.resp.monitor;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.black.common.annotation.DictDataProperty;
import com.black.system.excelconvert.SysDictDataConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

@Getter
@Setter
@ToString(callSuper = true)
@ApiModel(value = "SysLoginInforResp", description = "登录日志响应对象")
@ExcelIgnoreUnannotated
public class SysLoginInforResp {

    @ExcelProperty(value = "访问ID", index = 0)
    @ApiModelProperty(value = "访问ID")
    private Long infoId;

    @ExcelProperty(value = "用户账号", index = 1)
    @ApiModelProperty(value = "用户账号")
    private String userName;

    @ExcelProperty(value = "登录IP地址", index = 2)
    @ApiModelProperty(value = "登录IP地址")
    private String ipaddr;

    @ExcelProperty(value = "登录地点", index = 3)
    @ApiModelProperty(value = "登录地点")
    private String loginLocation;

    @ExcelProperty(value = "浏览器类型", index = 4)
    @ApiModelProperty(value = "浏览器类型")
    private String browser;

    @ExcelProperty(value = "操作系统", index = 5)
    @ApiModelProperty(value = "操作系统")
    private String os;

    @ExcelProperty(value = "登录状态", converter = SysDictDataConverter.class, index = 6)
    @DictDataProperty(value = "sys_common_status")
    @ApiModelProperty(value = "登录状态（0成功 1失败）")
    private String status;

    @ExcelProperty(value = "提示消息", index = 7)
    @ApiModelProperty(value = "提示消息")
    private String msg;

    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "访问时间", index = 8)
    @ApiModelProperty(value = "访问时间")
    private Date loginTime;

}
